home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-08 | 4.8 KB | 172 lines | [TEXT/ALFA] |
- ==============================================================================
- = Working with Modula-2 Files
- ==============================================================================
-
- Alpha will automatically switch into "Modula-2 Mode" or "M2 Mode" if you
- open a file with the ending .MOD, .mod, .DEF, or .def. If you start from
- scratch with menu command New or with any other file having a different
- extension and you wish to activate "M2 Mode", you can always achieve this
- by simply chooseing the "M2 Mode" in the Mode PopUp menu (down arrow) in
- top right corner of the window. As soon you are in the "M2 Mode" an
- additional menu, named M2, is inserted in the menubar, which offers you the
- M2-support (for keyboard shortcuts (key bindings) see below).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ==============================================================================
- = Typing and Templates
- ==============================================================================
-
- Alpha examines every keystroke when you are in Modula mode. It will expand your
- typing automaticly.
- For example: FOR(Space)i(Return)0(Return)9(Return) will give
- FOR i := 0 TO 9 DO
-
- END;(*FOR*)
- and the cursor placed is below FOR indented by modulaIndent (which is
- defined in the file userStartup.tcl).
-
- The Return-Key will NOT break the current line. Shift-Return will break the
- line at the current position.
-
- ESC followed by Space will expand the current word, if there is an
- equivalent in the reserved word list, or if there is a word in the text
- starting with the current word. The latter is searched first above and
- the below.
-
- For example: PROC(ESC)(Space) will result in PROCEDURE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ==============================================================================
- = "M2 Mode" specific keyboard shortcuts (keyboard bindings)
- ==============================================================================
-
- CTRL-1 Launch MacMETH or RAMSES Shell (depending on current configuration).
- CTRL-0 Open recently compiled Modula-2 source file (or all with errors).
- CTRL-j/CTRL-e Jump to next error.
- CTRL-g Jump to the next Placeholder (*. text .*).
- CTRL-SHIFT-g Jump to the previous Placeholder.
- CTRL-m Select the current line; expand with SHIFT-cursorUP/cursorDOWN
- CTRL-BACKSPACE Kills the entire current line
- OPT-BACKSPACE Kills the current line from the cursor position to the end
- TAB Insert indentation spaces (same as CTRL-r, configurable).
- CTRL-k Comment selection in the form (*. selection .*)
- CTRL-SHIFT-k Uncomment selection, must be in the form (*. text .*)
- CTRL-r/OPT-] Shift lines in selection to the right (by indentation spaces).
- CTRL-l/OPT-[ Shift lines in selection to the left (by half indentation spaces).
- CTRL-a Wrap selected Modula-2 comment. The result is in the form:
- (*
- comment
- *)
- CTRL-SHIFT-a Wrap selected Text. The left margin is the position of the first
- non white-space character in the selection
-
- CTRL-HOME Jump to the beginning of the file.
- CTRL-END Jump to the end of the file.
- CTRL-LEFT Backward one word.
- CTRL-RIGHT Forward one word.
-
- These shortcuts have been designed similar to the ones of MEdit, mainly for
- those user's using both editors (see RAMSES software package); simply use
- the control key instead of command. Note also, MEdit's shortcuts have been
- designed after the MPW user interface.
-
-
-
-
-
- ==============================================================================
- = Installation
- ==============================================================================
- Instructions on how to install the Modula-2 support in Alpha are given in
- a separate file named "READ ME Installation.tcl" which is available as
- part of the "RAMSES Extra" release (ftp.ito.umnw.ethz.ch).
-
-
-
-
-
-
-
- ==============================================================================
- = Customizing
- ==============================================================================
- The Modula-2 extension for the alpha editor is customizable by the file
- Prefs.tcl or by changing the Modula2.tcl:
-
- • Some customization is done by the commands "Configure Launching" and
- "Configure" in the M2 menu. "Configure Launching" lets you select the
- shell to which the launch commands (CTRL-1, CTRL-2) will transfer, and to
- choose the file which contains the messages which help you to interpret the
- compiler generated error codes. "Configure" lets you enter your name used
- by defaults in module templates, to set tab spaces (shift right, shift left
- respectively).
-
- • Editing Prefs.tcl:
- Open prefs.tcl (see Alpha's menu command "Edit Prefs.tcl"
- under menu "Edit") and add for instance the following line
-
- set defaultFont Programmer
-
- for having that useful font ready for your Modula-2 programming.
- Or you can define the variable modulaIndent by:
-
- set modulaIndent " "
-
- The content of this variable is used for indentation, or is inserted when
- you press tab.
- etc.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-